#include <iostream>
#include<cmath>
#include<string>
#include<stdlib.h>

using namespace std;

class Point{
public:
    Point(int a,int b):x(a),y(b){}
    friend double distance(const Point &p1);
private:
    double x,y;
};

double distance(const Point &p1)
{
    double d1,d2,dist;
    d1=p1.x-0.0;
    d2=p1.y-0.0;
    dist=sqrt(pow(d1,2)+pow(d2,2));
    return dist;
}

int main()
{
    int x,y,i;
    for(i=0;i<2;i++)
    {
        cout<<"enter the coordinate"<<endl;
        cin>>x>>y;
        Point p1(x,y);
        cout<<"the distance of the point is"<<distance(p1)<<endl;
    }

    system("pause");
    return 0;
}